﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using ZhimeiSoft.CharmManager.DOL;
using ZhimeiSoft.Framework.Client.Base;

namespace ZhimeiSoft.CharmManager.Client.Forms
{
    public partial class frmSelectServiceItem : FormBase
    {
        private List<DBEntityServiceItem> _serviceItemList;
        public frmSelectServiceItem()
        {
            InitializeComponent();

            serviceItemControl1.ServiceItemCategoryEditMode = false;
            serviceItemControl1.ServiceItemEditMode = false;
            serviceItemControl1.ShowServiceItemCategoryToolbar = false;
            serviceItemControl1.ShowServiceItemToolbar = false;
            serviceItemControl1.ShowServiceItemSearch = true;

            serviceItemControl1.Init();
        }

        public List<DBEntityServiceItem> ServiceItemList
        {
            get { return _serviceItemList; }
            set { _serviceItemList = value; }
        }

        private void frmSelectServiceItem_Shown(object sender, EventArgs e)
        {
            serviceItemControl1.ExpandNodes();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            _serviceItemList = serviceItemControl1.GetSelectedServiceItemInfo();
            this.DialogResult = DialogResult.OK;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        

        
    }
}
